<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: isimilarity</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: isimilarity</td>
      <td class="subheader-left"><a href="matlab:open isimilarity">View code for isimilarity</a></td>
    </tr>
  </table>
<h1>isimilarity</h1><p><span class="helptopic">Locate template in image</span></p><strong>s</strong> = <span style="color:red>isimilarity</span>(<strong>T</strong>, <strong>im</strong>) is an image where each pixel is the ZNCC similarity
of the template <strong>T</strong> (MxM) to the MxM neighbourhood surrounding the
corresonding input pixel in <strong>im</strong>.  <strong>s</strong> is same size as <strong>im</strong>.

<strong>s</strong> = <span style="color:red>isimilarity</span>(<strong>T</strong>, <strong>im</strong>, <strong>metric</strong>) as above but the similarity metric is specified
by the function <strong>metric</strong> which can be any of @sad, @ssd, @ncc, @zsad, @zssd.

<h2>Notes</h2>
<ul>
  <li>Similarity is not computed where the window crosses the image
boundary, and these output pixels are set to NaN.</li>
  <li>The ZNCC function is a MEX file and therefore the fastest</li>
  <li>User provided similarity metrics can be provided, the function accepts
two regions and returns a scalar similarity score.</li>
</ul>
<h2>See also</h2>
<p>
<a href="matlab:doc imatch">imatch</a>, <a href="matlab:doc sad">sad</a>, <a href="matlab:doc ssd">ssd</a>, <a href="matlab:doc ncc">ncc</a>, <a href="matlab:doc zsad">zsad</a>, <a href="matlab:doc zssd">zssd</a>, <a href="matlab:doc zncc">zncc</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2011 Peter Corke.</p>
</body></html>